commonlibsse_ng\re\b/
BGSAddToPlayerInventoryEvent.rs

1use crate::re::BGSLocation;
2use crate::re::BSPointerHandle::ObjectRefHandle;
3use crate::re::TESForm::TESForm;
4
5#[commonlibsse_ng_derive_internal::ffi_enum]
6#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7#[repr(u32)]
8pub enum ACQUIRE_TYPE {
9    None = 0,
10    Steal = 1,
11    Buy = 2,
12    PickPocket = 3,
13    Pickup = 4,
14    Container = 5,
15    DeadBody = 6,
16}
17
18#[derive(Debug, Clone, PartialEq)]
19pub struct BGSAddToPlayerInventoryEvent {
20    ownerRef: ObjectRefHandle,
21    containerRef: ObjectRefHandle,
22    location: *mut BGSLocation,
23    itemBase: *mut TESForm,
24    acquireType: ACQUIRE_TYPE_CEnum,
25}
26const _: () = assert!(core::mem::size_of::<BGSAddToPlayerInventoryEvent>() == 0x20);
27
28impl BGSAddToPlayerInventoryEvent {
29    #[commonlibsse_ng_derive_internal::relocate(
30        cast_as = "*mut *mut u32",
31        default = "None",
32        deref_once,
33        id(se = 508412, ae = 380074)
34    )]
35    pub fn get_index() -> Option<u32> {
36        |deref_type: DerefType| unsafe { deref_type.as_ref().copied() }
37    }
38}